#!/bin/bash
#===============================================================================
#
#          FILE:  lmpd.sh
# 
#         USAGE:  ./lmpd.sh 
# 
#   DESCRIPTION:  Launch  mpich ring
# 
#       OPTIONS:  ---
#  REQUIREMENTS:  ---
#          BUGS:  ---
#         NOTES:  ---
#        AUTHOR:  Basile Clout (BC), basile.clout@unb.ca
#       COMPANY:  Faculty of Computer Science at University of New Brunswick
#       VERSION:  1.0
#       CREATED:  01/02/08 22:44:35 AST
#      REVISION:  ---
#===============================================================================

#Close the existing ring for both basil and root user
mpdallexit;
mpdcleanup;
/home/basil/scripts/send_command "killall python2.4";

su  basil -c mpdallexit;
su  basil -c mpdcleanup;
su  basil -c "/home/basil/scripts/send_command \"killall python2.4\"";

killall python2.4;
#start ring
mpdboot -n 9 -f /home/basil/mpi/mpd.hosts
su basil -c "mpdboot -n 9 -f /home/basil/mpi/mpd.hosts"




